package Extend;

public class test4 {
    public static void main(String[] args) {
        Sub sub = new Sub(2,3);
        System.out.println(sub.calculate());
    }
}
class Base {
    private int x;
    public Base(int x) {
        this.x = x;
    }
    public int getX() {
        return x;
    }
}
class Sub extends Base {
    private int z;
    public Sub(int x, int z) {
        super(x);
        this.z = z;
    }
    public int calculate() {
        return super.getX()*z;
    }

}
